<?=form_open('raovat/add/',array('id'=>'adminformraovat'));?>
<input type="hidden" value="detailed" id="selected_section" name="selected_section">
<div class="cm-tabs-content">
    <div id="content_detailed">
        <h2 class="subheader">Thông tin</h2>
        <table width="100%" class="form">
            <tr>
                <td width="260" class="required label">Tên sản phẩm</td>
                <td><input type="text" id="lb_subject" class="max" name="lb_subject" value=""></td>
            </tr>
            <tr>
                <td class="label">Hình ảnh</td>
                <td><input type="text" name="lb_images" id="lb_images"class="w350" value="" />
                    <a href="<?=base_url()?>filemanager/index/lb_images" class="popupbox" title="Thêm File"> <img src="<?=base_url()?>templates/images/icon/attach.png" alt=""> </a></td>
            </tr>
            <tr>
                <td class="required label">Nơi đăng</td>
                <td><select name="town_id" id='town_id'>
                        <option value="0">== chọn ==</option>
                        <? foreach($town as $row):?>
                        <option value="<?=$row->town_id?>"><?=$row->town_name_vn?> </option>
                        <? endforeach;?>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="required label">Danh mục ngành nghề</td>
                <td><select name="catid" id="catid">
                		<option value="0">== chọn ==</option>
                        <? foreach($category as $cat): ?>
                        <option value="<?=$cat->catid?>"> <?=$cat->cat_name?> </option>
                        <? endforeach;?>
                    </select></td>
            </tr>
            <tr>
                <td class="label">Tính năng</td>
                <td><textarea id="wysiwyg-advanced" name="content"></textarea></td>
            </tr>
            <tr>
                <td class="required label">Hiển thị</td>
                <td><input type="checkbox" name="status" value="1" checked="checked"></td>
            </tr>
        </table>
    </div>
</div>
<div style="text-align:center">
    <input type="submit" name="bt_submit" value="" class="themmoi">
</div>
<?=form_close();?>
<script type="text/javascript">
     $("#adminformraovat").validate({
        rules: {
            lb_subject: "required",
            catid: "required",
        },
        messages: {
            lb_subject: "Vui lòng điền tiêu đề tin",
            catid: "Vui lòng chọn ngành nghề.",
        }
    });
     
</script> 
